package kr.saeildamil.androidstudty.ch17;

import android.app.TabActivity;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.Toast;

public class TabTest extends TabActivity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		TabHost tabHost = getTabHost();
		
		Intent intent1 = new Intent("kr.saeildamil.androidstudty.ch17.ACTIVITYLIFECYCLE");
		intent1.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
		tabHost.addTab(
				tabHost.newTabSpec("tab01")
				.setIndicator("Activity Life Cycle")
				.setContent(intent1)
				);
		
		Intent intent2 = new Intent(this, SaveState.class);
		//intent2.setComponent(new ComponentName("kr.saeildamil.androidstudty.ch17", "kr.saeildamil.androidstudty.ch17.SaveState"));
		intent2.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
		tabHost.addTab(
				tabHost.newTabSpec("tab02")
				.setIndicator("SaveState")
				.setContent(intent2)
				);
		
		Intent intent3 = new Intent(this, SaveCurve.class);
		intent3.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
		tabHost.addTab(
				tabHost.newTabSpec("tab03")
				.setIndicator("SaveCurve")
				.setContent(intent3)
				);

	}
}
